import {request} from 'umi';

export function getAuth(params = {}) {
    return request('/api/user/getAuth.do', {
        method: 'POST',
        // @ts-ignore
        prefix: 'https://api.baijia.com/mock/2545',
        data: {
            ...params,
        },
    });
}

export function logout() {
    return request(`https://${location.host}/user/logout.do`, {
        // @ts-ignore
        prefix: 'https://api.baijia.com/mock/2545',
        method: 'GET',
    });
}
